#bin/bash
use File::Basename qw(basename);

for my $text_file (glob 'working/tutorial/PR/*.txt') {
    my $base_name = basename($text_file, '.txt');
    system 'bin/tokkie',
        '--input'  => "working/tutorial/PR/$base_name.txt",
        '--quotes' => 'delete',
        '--output' => "working/tutorial/PR/$base_name.tok";
    system 'bin/pos',
        '--input'  => "working/tutorial/PR/$base_name.tok",
        '--model'  => 'models/pos',
        '--output' => "working/tutorial/PR/$base_name.pos";
    system 'bin/ner',
        '--input'  => "working/tutorial/PR/$base_name.pos",
        '--model'  => 'models/ner',
        '--output' => "working/tutorial/PR/$base_name.ner";
}
